package com.huizhan.web.model;

import javax.persistence.*;
import java.io.Serializable;
import java.text.SimpleDateFormat;

import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import java.util.Date;

/**
 * @Description 通行记录 
 * @Author  yanluping@outlook.com
 * @Date 2020-01-15 16:44:47 
 */
@JsonIgnoreProperties({"hibernateLazyInitializer","handler"})
@Entity
@ApiModel(value =  "通行记录")
@Table ( name ="Access_Record")
public class AccessRecord  implements Serializable {

	private static final long serialVersionUID =  8469354564212397045L;

	/**
	 * 通行记录ID
	 */
	@ApiModelProperty(value = "通行记录ID")
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
   	@Column(name = "Access_Record_Id" )
	private Long accessRecordId;

	/**
	 * 项目ID
	 */
	@ApiModelProperty(value = "项目ID")
   	@Column(name = "Project_Id" )
	private String projectId;

	/**
	 * 票ID
	 */
	@ApiModelProperty(value = "票ID")
   	@Column(name = "Ticket_Id" )
	private Long ticketId;

	/**
	 * 证件ID
	 */
	@ApiModelProperty(value = "证件ID")
   	@Column(name = "Document_Id" )
	private Long documentId;

	/**
	 * 票种ID
	 */
	@ApiModelProperty(value = "票种ID")
   	@Column(name = "Ticket_Type_Id" )
	private Long ticketTypeId;

	/**
	 * 证件类型ID
	 */
	@ApiModelProperty(value = "证件类型ID")
   	@Column(name = "Document_Type_Id" )
	private Long documentTypeId;

	/**
	 * 办证门禁点ID
	 */
	@ApiModelProperty(value = "办证门禁点ID")
   	@Column(name = "Project_Door_Id" )
	private Long projectDoorId;

	/**
	 * 名称
	 */
	@ApiModelProperty(value = "名称")
   	@Column(name = "Name" )
	private String name;

	/**
	 * 票类型名称
	 */
	@ApiModelProperty(value = "票类型名称")
   	@Column(name = "typeName" )
	private String typeName;

	/**
	 * 人ID
	 */
	@ApiModelProperty(value = "人ID")
   	@Column(name = "Personal_Id" )
	private String personalId;

	/**
	 * 类型：1 组委会、2 展商、3 工作人员、4 观众、5 媒体
	 */
	@ApiModelProperty(value = "类型：1 组委会、2 展商、3 工作人员、4 观众、5 媒体")
   	@Column(name = "Type" )
	private Long type;

	/**
	 * 编号
	 */
	@ApiModelProperty(value = "编号")
   	@Column(name = "ID_Number" )
	private String idNumber;

	/**
	 * 头像
	 */
	@ApiModelProperty(value = "头像")
   	@Column(name = "Avatar" )
	private String avatar;

	/**
	 * 票码
	 */
	@ApiModelProperty(value = "票码")
   	@Column(name = "Code" )
	private String code;

	/**
	 * 门禁点
	 */
	@ApiModelProperty(value = "门禁点")
   	@Column(name = "Door" )
	private String door;

	public String DateString(){
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
		return formatter.format(this.createDate);
	}
	
	public String getTypeName() {
		return this.typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	/**
	 * 创建日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@ApiModelProperty(value = "创建日期",example = "2018-10-01 12:18:48")
   	@Column(name = "CreateDate" )
	private Date createDate;

	public Long getAccessRecordId() {
		return this.accessRecordId;
	}

	public void setAccessRecordId(Long accessRecordId) {
		this.accessRecordId = accessRecordId;
	}

	public String getProjectId() {
		return this.projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public Long getTicketId() {
		return this.ticketId;
	}

	public void setTicketId(Long ticketId) {
		this.ticketId = ticketId;
	}

	public Long getDocumentId() {
		return this.documentId;
	}

	public void setDocumentId(Long documentId) {
		this.documentId = documentId;
	}

	public Long getTicketTypeId() {
		return this.ticketTypeId;
	}

	public void setTicketTypeId(Long ticketTypeId) {
		this.ticketTypeId = ticketTypeId;
	}

	public Long getDocumentTypeId() {
		return this.documentTypeId;
	}

	public void setDocumentTypeId(Long documentTypeId) {
		this.documentTypeId = documentTypeId;
	}

	public Long getProjectDoorId() {
		return this.projectDoorId;
	}

	public void setProjectDoorId(Long projectDoorId) {
		this.projectDoorId = projectDoorId;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPersonalId() {
		return this.personalId;
	}

	public void setPersonalId(String personalId) {
		this.personalId = personalId;
	}

	public Long getType() {
		return this.type;
	}

	public void setType(Long type) {
		this.type = type;
	}

	public String getIdNumber() {
		return this.idNumber;
	}

	public void setIdNumber(String idNumber) {
		this.idNumber = idNumber;
	}

	public String getAvatar() {
		return this.avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDoor() {
		return this.door;
	}

	public void setDoor(String door) {
		this.door = door;
	}

	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Override
	public String toString() {
		return "{" +
					"accessRecordId='" + accessRecordId + '\'' +
					"projectId='" + projectId + '\'' +
					"ticketId='" + ticketId + '\'' +
					"documentId='" + documentId + '\'' +
					"ticketTypeId='" + ticketTypeId + '\'' +
					"documentTypeId='" + documentTypeId + '\'' +
					"projectDoorId='" + projectDoorId + '\'' +
					"typeName='" + typeName + '\'' +
					"name='" + name + '\'' +
					"personalId='" + personalId + '\'' +
					"type='" + type + '\'' +
					"idNumber='" + idNumber + '\'' +
					"avatar='" + avatar + '\'' +
					"code='" + code + '\'' +
					"door='" + door + '\'' +
					"createDate='" + createDate + '\'' +
				'}';
	}

}
